package cn.lingyangwl.agile.infra.dict.service;

import cn.lingyangwl.agile.infra.dict.model.DictResetMQ;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author shenguangyang
 */
@Service
public class DictMqService {
    @Resource
    private RabbitTemplate rabbitTemplate;

    public void resetLocalCache(DictResetMQ req) {
        rabbitTemplate.convertAndSend(DictResetMQ.EXCHANGE, DictResetMQ.KEY, req.toMessage());
    }
}
